package com.pan.service;


import com.pan.entity.Result;
import com.pan.entity.User;
import com.pan.vo.UserRegisterVo;
import com.pan.vo.UserVo;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.InvocationTargetException;

public interface UserService {

    Result toLogin(HttpServletRequest request, HttpServletResponse response, Long tel, String password);

    Result register(UserRegisterVo userRegisterVo);

    Result logoff(HttpServletResponse response,String userTicket);

    Result<UserVo> selectByTel(String userTicket, Long tel);


    Result<UserVo> selectById(Long id);

    @Transactional
    Result updatePassword(String userTicket, String oldPassword, String newPassword) throws NoSuchFieldException, InvocationTargetException, NoSuchMethodException, IllegalAccessException;

    @Transactional
    <T> Result updateInfo(String userTicket, String memberName, T value) throws NoSuchFieldException, NoSuchMethodException, InvocationTargetException, IllegalAccessException;
}
